<extend name="Public/common" />
<block name="body">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>服务器管理</h5>
                        <h5 style="float: right;"><a href="javascript:location.reload();"><i class="fa fa-refresh"></i></a></h5>
                    </div>
                    <div class="ibox-content">
                        <div class="row">

                        </div>
                        <div class="table-responsive">
                            <form action='__APP__/database/xiuok' method='post'>
                                <table class="table table-striped">
                                    <volist name="result" id="v">
                                        <tr>
                                            <th>id</th>
                                            <td>{$v.id}<input name="id" type="hidden" value="{$v.id}"></td>
                                        </tr>
                                        <tr>
                                            <th>服务器名称</th>
                                            <td><input type="text" name="name" value="{$v.name}"></td>
                                        </tr>
                                        <tr>
                                            <th>所属服务器</th>
                                            <td>
                                                <select name='pid'>
                                                    <option value='{$v.pid}' selected>{$v.pid|daqu}</option>
                                                    <volist name="result2" id="v2">
                                                        <option value='{$v2.id}'>{$v2.name}</option>
                                                    </volist>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>开服时间</th>
                                            <td>
                                                <input type="text" name="stime" onfocus="MyCalendar.SetDate(this)"  id="etime" value="<?php echo $rq;?>" style="display: none;"/>

                                                <input type="text" id="ccvvbb" name="etime" onfocus="retime()" value="{$v.etime|retime}" >
                                            </td>
                                        </tr>
                                        <!--<tr>-->
                                            <!--<th>数据库名称</th>-->
                                            <!--<td><input type="text" name="database" value="{$v.database}"></td>-->
                                        <!--</tr>-->
                                        <tr>
                                            <th>状态</th>
                                            <td><input type="text" name="state" value="{$v.state}"></td>
                                        </tr>
                                        <tr>
                                            <th><input type="submit">&nbsp;&nbsp;&nbsp;<input type="reset" onclick="oretime()"></th>
                                        </tr>
                                    </volist>
                                    </thead>
                                </table>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script language="JavaScript" src="__ROOT__/Public/js/mydate.js"></script>
    <script>
        function retime(){
         $("#etime").attr("style","")
         $("#ccvvbb").attr("style","display:none;")
         $("#etime").focus()
            $("#etime").attr("name",'etime')
            $("#ccvvbb").attr("name","same")
        }
        function oretime(){
            $("#etime").attr("style","display:none;")
            $("#ccvvbb").attr("style","")
            $("#etime").attr("name",'stime')
            $("#ccvvbb").attr("name","etime")
        }
    </script>
</block>